package com.mapper;

import com.pojo.GongYi_x;
import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface GongYiMapper_x {
    @Select("select * from gongyi_x")
    public List<GongYi_x> selectAll();
    @Select("select * from gongyi_x where del=1")
    public List<GongYi_x> select1();

    @Insert("insert into gongyi_x (title,img,del,content) values (#{title},#{img},#{del},#{content})")
    Integer add(GongYi_x gongYiX);
    @Update("update gongyi_x set title=#{title},img=#{img},del=#{del},content=#{content} where id=#{id}")
    Integer update(GongYi_x gongYiX);
    @Delete("delete from gongyi_x where id=#{id}")
    Integer delete(Integer id);
    public List<GongYi_x> select(@Param("id") Integer id, @Param("title") String title);
}
